package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.ui.HLUIControlButton;

public class HLClassUIControlButton extends HLLibClass {
    public HLClassUIControlButton(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLUIControlButton();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                ((HLUIControlButton) self).CurFrame();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLUIControlButton) self).CurFrame());
            }
            break;
        }
        case 1: {
            if (resultOwnerObject == null) {
                ((HLUIControlButton) self).GetFrame(args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLUIControlButton) self).GetFrame(args.GetInt(0)));
            }
            break;
        }
        case 2: {
            if (resultOwnerObject == null) {
                ((HLUIControlButton) self).UpToButton();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLUIControlButton) self).UpToButton());
            }
            break;
        }
        case 3: {
            if (resultOwnerObject == null) {
                ((HLUIControlButton) self).DownToButton();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLUIControlButton) self).DownToButton());
            }
            break;
        }
        case 4: {
            if (resultOwnerObject == null) {
                ((HLUIControlButton) self).LeftToButton();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLUIControlButton) self).LeftToButton());
            }
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                ((HLUIControlButton) self).RightToButton();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLUIControlButton) self).RightToButton());
            }
            break;
        }
        case 6: {
            if (resultOwnerObject == null) {
                ((HLUIControlButton) self).IsFocusable();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLUIControlButton) self).IsFocusable());
            }
            break;
        }
        }
    }
}
